﻿using System;
using System.Text;
using Stee.CAP8.Entity;

namespace SampleEntity
{
    [Cacheable]
    public class SampleIncident: BaseEntity
    {
        public string IncidentNumber { get; set; }

        public double IncidentLocationLong { get; set; }

        public double IncidentLocatoinLat { get; set; }

        [CacheableIgnore]
        public string IncidentLocationText
        {
            get
            {
                return $"Lat: {IncidentLocatoinLat}, Long: {IncidentLocationLong} ";
            }
        }
        public override string ToString()
        {
            var builder=new StringBuilder(base.ToString());
            builder.Append("IncidentNumber: ").Append(this.IncidentNumber).Append("; ")
                .Append("IncidentLocationText: ").Append(this.IncidentLocationText);
            return builder.ToString();

        }
    }
}
